import React, { FC, useContext } from 'react';
import { View, Text } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import { ProductCardContext } from '@/pages/components/ProductCard/ProductCardContext';
export interface IProps extends ICompProps {}
WillPay.defaultProps = {} as Partial<IProps>;
function WillPay(props: IProps) {
    const { className, style } = props;
    const localClassName = useClassName('WillPay', className);
    const { handlePay } = useContext(ProductCardContext);
    return (
        <RootView className={localClassName} style={style}>
            <button className="button" onClick={handlePay}>
                立即支付
            </button>
        </RootView>
    );
}
export default React.memo(WillPay as FC<IProps>);
const RootView = styled(View)`
    &.WillPay {
        .button {
            width: 148px;
            height: 52px;
            border-radius: 26px;
            border: 2px solid #ff8828;
            font-size: 24px;
            font-weight: 400;
            color: #ff8828;
            background-color: #fff;
        }
    }
`;
